package com.github.jinatonic.confetti.sample.slice;

import com.github.jinatonic.confetti.CommonConfetti;
import com.github.jinatonic.confetti.ConfettiManager;
import ohos.aafwk.content.Intent;

public class FallingConfettiFromTopAbilitySlice extends AbstractAbilitySlice{
    @Override
    protected void onStart(Intent intent) {
        super.onStart(intent);
    }

    @Override
    protected ConfettiManager generateOnce() {
        return CommonConfetti.rainingConfetti(container, getColors())
                .oneShot();
    }

    @Override
    protected ConfettiManager generateStream() {
        return CommonConfetti.rainingConfetti(container, getColors())
                .stream(3000);
    }

    @Override
    protected ConfettiManager generateInfinite() {
        return CommonConfetti.rainingConfetti(container, getColors())
                .infinite();
    }
}
